package com.cailu.receiver.config;

import org.springframework.amqp.rabbit.annotation.RabbitListener;
import org.springframework.stereotype.Component;

import com.cailu.common.bean.UserReqBean;
import com.cailu.common.constant.DirectSenderCommon;

/**
 * 监听
 * @author cailu
 * @date 2019年12月28日
 * @Title:HelloReceive.java
 */
@Component
public class DirectSenderReceive {

	/**
	 * 功能描述  监听器监听指定的Queue-queue
	 * @param str 监听的内容
	 * @return void
	 * @author cailu
	 * @date 2020/3/31 14:30
	 */
	@RabbitListener(queues = DirectSenderCommon.DIRECT_DEMO)
	public void processQueue(String str) {
		System.out.println("Receive---demo:========================:" + str.toString());
	}

	/**
	 * 功能描述  监听器监听指定的Queue-queue
	 * @param str 监听的内容
	 * @return void
	 * @author cailu
	 * @date 2020/3/31 14:30
	 */
	@RabbitListener(queues = DirectSenderCommon.DIRECT_HELLO)
	public void processHelloQueue(String str) {
		System.out.println("Receive---hello:========================:" + str.toString());
	}

	/**
	 * 功能描述  监听指定对象
	 * @param str 监听的内容
	 * @return void
	 * @author cailu
	 * @date 2020/3/31 14:38
	 */
	@RabbitListener(queues = DirectSenderCommon.DIRECT_BEAN)
	public void processUserVoQueue(UserReqBean str) {
		System.out.println("Receive---sendUserVo:========================:" + str.toString());
	}


}
